<?php 
$catminislider = 67; 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="vi" xml:lang="vi">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <meta charset="<?php bloginfo('charset'); ?>" />


        <title> <?php wp_title('|', true, 'right'); ?></title>


        <?php wp_head(); ?>
        <link href="<?php echo bloginfo('template_url'); ?>/css/bootstrap.css" rel="stylesheet" media="screen" />
        <link href="<?php echo bloginfo('template_url'); ?>/css/bootstrap-glyphicons.css" rel="stylesheet" media="screen" />
        <link href="<?php echo bloginfo('template_url'); ?>/css/custom.css" rel="stylesheet" />
        <script src="<?php echo bloginfo('template_url'); ?>/js/fancy/jquery.fancybox.js" type="text/javascript"></script>
        <link href="<?php echo bloginfo('template_url'); ?>/js/fancy/jquery.fancybox.css" rel="stylesheet" />
        <style type="text/css">
             html {
                 margin-top: 0px !important;
             }
             #wpadminbar{
                display: none !important;
             }
        </style>
    </head>

    <body  class="home blog">

        <div class="top-head">
            <div class="container">
                <?php wp_nav_menu(array('menu_class' => '', 'menu' => 'Topmenu', 'depth' => 1,'container' => 'none')); ?>

                <div class="search">
                    <a href="<?php echo site_url() ?>/sitemap">Sơ đồ chỉ đường</a>
                    <form action="<?php echo site_url() ?>" method="get">
                        <input type="text" name="s" placeholder="Nhập từ khóa tìm kiếm" />
                        <input type="submit" value="&nbsp;" />
                    </form>
                </div>
                <div class="circle">
                     <div id="carousel-example-slider" class="carousel slide" data-ride="carousel" data-interval="5000">
                        <!-- Wrapper for slides -->
                        <div class="carousel-inner">
                            <?php
                            wp_reset_query(); $k = 0 ; 
                            query_posts(array('cat' => $catminislider));
                            while (have_posts()): the_post();
                                ?>
                                <div class="item <?php echo !$k++ ? 'active' : ''  ?>">
                                    <a href="<?php the_permalink() ?>">
                                        <?php the_post_thumbnail(array(187, 210)) ?>
                                    </a> 
                                </div>
                            <?php endwhile; ?>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="mid-head">
            <div class="container">
                <div class="logo">
                    <a href="<?php echo site_url() ?>"><img src="<?php echo bloginfo('template_url'); ?>/img/logo.png"></a>
                </div>
                <?php
                $items = wp_get_nav_menu_items('Mainmenu');
                ?>
                <ul class="main-menu">
                    <?php
                    foreach ($items as $lv1) {
                        $cururl = curPageURL();
                        if ($lv1->menu_item_parent == 0) {
                            ?>
                            <li class="<?php echo strtolower($lv1->url) == strtolower($cururl) ? 'active' : '' ?>">
                                <a href="<?php echo $lv1->url ?>"><?php echo $lv1->title ?></a>
                                <div>
                                    <div class="container">
                                        <?php
                                        foreach ($items as $lv2) {
                                            if ($lv2->menu_item_parent == $lv1->ID) {
                                                ?>

                                                <div>
                                                    <a href="<?php echo $lv2->url ?>"><?php echo $lv2->title ?></a>
                                                    <ul>
                                                        <?php
                                                        foreach ($items as $lv3) {
                                                            if ($lv3->menu_item_parent == $lv2->ID) {
                                                                ?>
                                                        <li><a href="<?php echo $lv3->url ?>"><?php echo $lv3->title ?></a></li>
                                                            <?php }
                                                        }
                                                        ?>

                                                    </ul>
                                                </div>


                                                <?php
                                            }
                                        }
                                        ?>
                                    </div>
                                </div>
                            </li>
                            <?php
                        }
                    }
                    ?>

                </ul>
            </div>
        </div>



